<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

	<head>
		
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<script type="text/javascript" src="../zxt/zxt.js"></script>
		<script>importZXT("../zxt");</script>
		<jsp:include page="/WEB-INF/ZXTJSP/ZXTHeader.jsp" />
		<script type="text/javascript" src="./WIDGET.js"></script>
	</head>
	
	<body>
	
	<br>
	
		<!-- Download Widget -->
		<table width="800">
			<tr valign="top">			
				<td width="400">
					<div id="filePath" zxt="zxt.ui.Textbox"></div>
				</td>
				<td width="200">
					<div id="fileName" zxt="zxt.ui.Textbox"></div>
				</td>
				<td width="200">
					<div id="download" zxt="zxt.ui.DownLoad" ></div>
					<div id="BtnDownload" zxt="zxt.ui.Button" zxt.label="submit" zxt.text="下载" ></div>
				</td>
			</tr>
		</table>
	
	
		<table width="800">
			<tr valign="top">			
				<td width="400">
					<div id="Upload1"></div>
					
				</td>
				<td width="400">	
					<div id="BtnUpload" zxt="zxt.ui.Button" zxt.label="upload" zxt.text="上传" ></div>
				</td>					
			</tr>
		</table>
	
		
		<hr>

		<table width="800">		
			<tr valign="top">			
				<td width="420">
					<div id="select" zxt="zxt.ui.Select" zxt.options="a:1,b:2,c:3">
						<div zxt.option="Male" zxt.label="男"></div>
						<div zxt.service="CODE1" zxt.method="query" zxt.async="false" zxt.param="{codeType:'001',labelColumn:'2',valueColumn:'3'}"></div>
						<div zxt.option="Female" zxt.label="女"></div>
					</div>
				</td>
				<td width="420">
					<div id="combobox" zxt="zxt.ui.Combobox" zxt.labelonly="false" zxt.required="true" zxt.options="a:1,b:2,c:3" zxt.chooseonly="false" >
						<div zxt.option="Male" zxt.label="男"></div>
						<div zxt.service="CODE2" zxt.async="false" zxt.method="query" zxt.param="{codeType:'001',labelColumn:'2',valueColumn:'3'}"></div>
						<div zxt.option="Female" zxt.label="女"></div>
					</div>
				</td>
			</tr>
			
			<tr valign="top">			
				<td width="420">
					<div id="Listbox1" zxt="zxt.ui.Listbox" zxt.labelonly="true" zxt.async="false">					
						<div zxt.service="CODE1" zxt.method="query" zxt.param="{codeType:'001',labelColumn:'2',valueColumn:'3'}"></div>					
					</div>
				</td>
				<td width="420">
						<div id="aTree"  zxt="zxt.ui.Tree" zxt.model="tmodel" zxt.label="xptree" zxt.text="DemoTree"></div>	  	
				</td>
			</tr>
		</table>  
	  
	  <hr>
	  
	  <div id="xss" zxt="zxt.ui.Textbox" zxt.tip="XSS" zxt.conf="TextTransform:'lowercase'"></div>
  	
  	<div id="BtnCommit" zxt="zxt.ui.Button" zxt.label="Commit" zxt.text="AJAX提交" ></div>
	</body>
</html>

<script type="text/javascript">	
	$zxt.TOKEN = true;
	$zxt.XSS = true;
	$zxt.init("WIDGET");	
	
	
	var id = 0;
	var box = new zxt.ui.Upload("loc.to?page=ULOAD&pageName="+id);	
	$zxt.register(box,"Upload1");
	$("#Upload1").append(box.render());
	
	function uploadCallback(success){
		if(success){
			alert("success!");
		}else{
			alert("failed!");
		}
	}	
	
</script>